/* eslint-disable */
import Vue from "vue";
import VueRouter from "vue-router";
import Home from "../views/Home.vue";
import MircoAppDemo from "../views/MircoAppDemo.vue";
import VideoDemo from "../views/VideoDemo.vue";
Vue.use(VueRouter);

const routes = [
    {
        path: "/",
        name: "Home",
        component: Home,
    },
    {
        path: '/video',
        name: 'video',
        component: VideoDemo
    },
    {
        // 👇 非严格匹配，/mirco/* 都指向 MircoAppDemo 页面
        path: '/mirco',
        name: 'mirco',
        component: MircoAppDemo
    },
    {
        path: '/pdf',
        name: "PdfPages",
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () =>
            import(/* webpackChunkName: "about" */ "../views/PdfPages.vue"),
    },
    {
        path: "/about",
        name: "About",
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () =>
            import(/* webpackChunkName: "about" */ "../views/About.vue"),
    },
    {
        path: "/shopping",
        name: "Shopping",
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () =>
            import(/* webpackChunkName: "shopping" */ "../views/Shopping.vue"),
    },
];

const router = new VueRouter({
    mode: "history",
    base: process.env.BASE_URL,
    routes,
});

export default router;
